package cn.iocoder.yudao.module.xkfz.mapper.operationalPerformance;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.xkfz.domain.entity.operationalPerformance.AcademicMisconduct;
import cn.iocoder.yudao.module.xkfz.domain.excel.entity.Standard;
import cn.iocoder.yudao.module.xkfz.domain.excel.po.StandardPo;
import cn.iocoder.yudao.module.xkfz.domain.po.operationalPerformance.AcademicMisconductPo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.Arrays;

/**
 * 学术不端
 */
@Mapper
@Repository
public interface AcademicMisconductMapper extends BaseMapperX<AcademicMisconduct> {


    default PageResult<AcademicMisconduct> selectPage (AcademicMisconductPo reqPo) {
        return selectPage(reqPo, new LambdaQueryWrapperX<AcademicMisconduct>()
                .likeIfPresent(AcademicMisconduct::getPeriodTime, reqPo.getPeriodTime())
                .eqIfPresent(AcademicMisconduct::getDeptName, reqPo.getDeptName())
                .orderByDesc(Arrays.asList(AcademicMisconduct::getUpdateTime)));
            }

}
